package com.leng.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author leng
 * @since 2022-08-21
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("biz_supplier")
public class Supplier extends Model<Supplier> {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 供应商名称
     */
    @TableField("name")
    private String name;

    /**
     * 供应商地址
     */
    @TableField("address")
    private String address;

    /**
     * 供应商邮箱
     */
    @TableField("email")
    private String email;

    /**
     * 供应商电话
     */
    @TableField("phone")
    private String phone;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField("modified_time")
    private LocalDateTime modifiedTime;

    /**
     * 排序
     */
    @TableField("sort")
    private Integer sort;

    /**
     * 联系人
     */
    @TableField("contact")
    private String contact;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
